#include "pcmfilespec.h"



PCMFileSpec::PCMFileSpec(int sampleRate, int channelLayout, AVSampleFormat format,char *filePath):
    PCMSpec(sampleRate,channelLayout,format)
{

    if(filePath) {

        int len = strlen(filePath);
        _filePath = new char[len + 1]{};
        memcpy(_filePath,filePath,len);
    }

}

PCMFileSpec::~PCMFileSpec()
{

    if(_filePath) {

        delete [] _filePath;
        _filePath = nullptr;
    }
}

char *PCMFileSpec::getFilePath() const
{

    return _filePath;
}
